package com.indeep.user.feign;

import com.indeep.common.result.JsonResult;
import com.indeep.user.dto.feign.UserPostsDetailDTO;
import com.indeep.user.feign.rollback.CommunityFeignClientBack;
import com.indeep.user.mapper.po.IdNameImageUrlIsNewCPO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "indeep-community",fallback = CommunityFeignClientBack.class )
public interface CommunityFeignClient {
    String preIndex = "/community";
    @GetMapping(preIndex+"/posts/current/detail")
    JsonResult<UserPostsDetailDTO> queryCurrentUserPostsDetail(@RequestParam("userId")Long id);
    @GetMapping(preIndex+"/circle/query/follow")
    JsonResult<List<IdNameImageUrlIsNewCPO>> queryUserFollowCommunity(@RequestParam("userId") Long userId);
}
